home *** CD-ROM | disk | FTP | other *** search
/ The Essential Home & Business Collection / The Essential Home & Business Collection.iso / 27 / 3 / 5 / HP22D5.ZIP / EXTERN / IO / READ.ASM < prev    next >
Assembly Source File  |  1991-04-16  |  501b  |  38 lines

  1. DOSSEG
  2. .MODEL        LARGE
  3.  
  4. .DATA
  5.  
  6. .CODE
  7.  
  8. ; ---------------------------------------------------------------------------
  9. ; read(handle,buf,num_bytes);
  10. ; ---------------------------------------------------------------------------
  11.         public        _read
  12. _read        proc        far
  13.         push        bp
  14.         mov        bp,sp
  15.         push        ds
  16.         
  17.         mov        ah,03fh
  18.         mov        bx,[bp+6]
  19.         lds        dx,[bp+8]
  20.         mov        cx,[bp+12]
  21.         int        21h
  22.  
  23.         jnc        end_read
  24.  
  25.         mov        ax,-1
  26. end_read:
  27.         pop        ds
  28.         pop        bp
  29.         retf
  30. _read        endp
  31.  
  32.         END
  33.  
  34.  
  35.  
  36.  
  37.  
  38.